/**
 * handle header module
 */
import Action from "./Action";
import Zoom from "./Zoom";
import zoomProvider from "../../../utils/zoomProvider";
import React,{Component} from "react";

class HandleHeader extends Component{
    render(){
        const {scale,fromTemplate,switchType,setState} = this.props;
//        var scale = zoomProvider.scale();
        let changedHeight = 20*scale + 81 + 'px';//画布缩放，高度修改
        let changedWidth = 20*scale + 65 + 'px';
        let rSytle = {
            left: !fromTemplate ? switchType == 'ThreedAR' ? '65px' :changedWidth: '0px',
            top: !fromTemplate ? switchType == 'ThreedAR' ? '63px' : changedHeight: '83px',
        };
        return (
            <div className="hanldeHeader" style={rSytle}>
                <Zoom scale={scale} setState={setState} fromTemplate={fromTemplate}/>
                <Action />
            </div>
        )
    }
}

module.exports = HandleHeader;
